<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<link rel="Stylesheet" type="text/css"
		href="../../componentes/estilos/estilo.css" />
</h:head>

<p:panel>
<f:facet name="header"> Propriedades</f:facet>
<h:outputLabel value="Proprietario" /><br/>
<p:inputText value="#{proprietarioMB.proprietario.nome}" disabled="true" size="40" />
<p:separator />
<p:dataTable id="propriedades" var="propriedade" value="#{propriedadeMB.propriedades}" rowKey="#{propriedade.id}"  
                 selection="#{propriedadeMB.propriedade}" selectionMode="single"> 
                 
        <f:facet name="header">  
        	Selecione uma propriedade
        </f:facet>  
        
       	<p:column headerText="ID">  
            #{propriedade.id}  
        </p:column>  
  
        <p:column headerText="Endereço">  
            #{propriedade.endereco.rua}  
        </p:column>  

        <f:facet name="footer">
        	<p:commandButton id="btnAdicionar" value="Adicionar" label="Adicionar" onclick="dlgInserirPropriedade.show()" />
            <p:commandButton id="btnAlterar" value="Alterar" label="Alterar"/>
            <p:commandButton id="btnPreencherQuestinarioGeral" value="Preencher Questionário Geral" label="Preencher Questionário Geral" onclick="dlgQuestionarioGeral.show()"/>  
        </f:facet>

</p:dataTable>
<p:separator />
		<p:commandButton value="Voltar" action="#{navBean.requestPage('questionarios/questionario-geral/formProprietario.xhtml')}"
		type="submit" update="frCentral" ajax="true">
		</p:commandButton>
</p:panel>

</html>